  <div class="header">
    <div class="header_l"><a href="http://www.sxwrj.com" title="" target="_blank"><img src="{{$temps_src}}/images/logo.jpg"></a>
    </div>
    <div class="header_r">
      <div class="m_searchbar">
        <form class="form" action="/search" name="searchForm" method="get" id="searchForm">
          <div class="searchbg">
            <div class="searchbg01">
              <input type="text" id="Z_keyword" class="searchtext" name="keywords" placeholder="请输入关键字...">
            </div>
            <div class="searchbg02"><input name="do_search1" id="Z_do_search" class="searchbtn" type="submit"></div>
          </div>
        </form>
        
      </div>
    </div>
  </div>
  <script type="text/javascript">
    function dropMenu(obj) {
      $(obj).each(function () {
        var theSpan = $(this);
        var theMenu = theSpan.find(".submenu");
        var tarHeight = theMenu.height();
        theMenu.css({ height: 0, opacity: 0 });
        theSpan.hover(
          function () {
            $(this).addClass("selected");
            theMenu.stop().show().animate({ height: tarHeight, opacity: 1 }, 400);
          },
          function () {
            $(this).removeClass("selected");
            theMenu.stop().animate({ height: 0, opacity: 0 }, 400, function () {
              $(this).css({ display: "none" });
            });
          }
        );
      });
    }
    $(document).ready(function () { dropMenu(".navlist"); });
  </script>
  <div class="navbox">
    <div class="nav">
    <ul>
        <li><a href="/">首页</a>
        </li>
        @foreach($catecn as $v)
        <li>
        @if($v['type'] == 1) 
                      <a class="navNameLink" href="/category/{{$v['id']}}.html" target="_self">{{$v['name']}}</a>
                      @elseif($v['type'] == 2)
                      <a class="navNameLink" href="/list/{{$v['id']}}.html" target="_self">{{$v['name']}}</a>
                      @elseif($v['type'] == 3)
                      <a class="navNameLink" href="/page/{{$v['id']}}.html" target="_self">{{$v['name']}}</a>
                      @else
                      <a class="navNameLink" href="{{$v['link']}}" target="_self">{{$v['name']}}</a>
                      @endif
                      @if($v['children'] !="")
          <ul class="nav_sub" style="display: none;">
          @foreach($v['children'] as $m)
                          @if($m['type'] == 1)
            <li><a href="/category/{{$m['id']}}.html">{{$m['name']}}</a></li>
            @elseif($m['type'] == 2)
            <li><a href="/list/{{$m['id']}}.html">{{$m['name']}}</a></li>
            @elseif($m['type'] == 3)
            <li><a href="/page/{{$m['id']}}.html">{{$m['name']}}</a></li>
            @else($m['type'] == 3)
            <li><a href="{{$m['link']}}">{{$m['name']}}</a></li>
            @endif
            @endforeach
          </ul>
          @endif
        </li>
        @endforeach
      </ul>
    </div>
  </div>
  <script type="text/javascript">

    $(function () {

      /*当前页面导航高亮*/
      var href = window.location.href.split('/')[window.location.href.split('/').length - 1].substr(0, 4);
      if (href.length > 0) {
        $(function () {
          $("ul.nav a:first[href^='" + href + "']").attr("class", "on");
          if ($("ul.nav a:first[href^='" + href + "']").size() == 0) {
            $("ul.nav a:first[href^='index']").attr("class", "on");
          }
        });
      } else {
        $(function () { $("ul.nav a:first[href^='index']").attr("class", "on") });
      }

      /*下拉菜单*/
      $(".nav li").hover(function () {
        $(this).parents(".nav > li").find("a:first").addClass("on2");
        $(this).find("ul:first").show(); //鼠标滑过查找li下面的第一个ul显示
      }, function () {
        var navobj = $(this).find("ul:first");
        navobj.hide();

        //鼠标离开隐藏li下面的ul
        if (navobj.attr("class") == "nav_sub") {
          $(this).find("a:first").removeClass("on2");
        }
      })

      //给li下面ul是s的样式的前一个同辈元素添加css
      $(".nav li ul li ul").prev().addClass("t");
    })


    //加入收藏
    function AddFavorite() {
      if (document.all) {
        try {
          window.external.addFavorite(window.location.href, document.title);
        } catch (e) {
          alert("加入收藏失败，请使用Ctrl+D进行添加！");
        }
      } else if (window.sidebar) {
        window.sidebar.addPanel(document.title, window.location.href, "");
      } else {
        alert("加入收藏失败，请使用Ctrl+D进行添加！");
      }
    }
  </script>
  